<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>E-Greeting: Results for search by name</title>
<%@page import="java.util.Properties"%>
<%@page import="java.util.Enumeration"%>
</head>
<body>
Please select the chosen recipient from the following search results: <br/>
<form action="SearchResultsServlet" method="post" >
<select name="selectedResult" size="5">
<%
	Properties prop = (Properties) session.getAttribute("searchResults");
	Enumeration<Object> propIt = prop.keys();
	String key = null;
	while (propIt.hasMoreElements())
	{
		key = (String) propIt.nextElement();%>
		<option value="<%= key %>" ><%= key  %> <%= prop.get(key) %></option>
	<% }
%>
</select>
<input type="submit" name="select" value="Select" />
<input type="submit" name="cancel" value="Cancel" />
</form>
</body>
</html>